
<div class="block small left">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>添加/编辑</h2>	
				</div>		<!-- .block_head ends -->
				
				
				
				<div class="block_content">
				
					<form action="spider.php?mod=category&act=edit" method="post">
						<p>
							<label>分类名称:</label><br />
							<input name="cat_name" type="text" class="text" value="<?php echo isset($cat['cat_name'])?$cat['cat_name']:'';?>" />
						</p>
						<p>
							<label>英文名称:</label><br />
							<input name="cat_en_name" type="text" class="text" value="<?php echo isset($cat['cat_en_name'])?$cat['cat_en_name']:'';?>" />
						</p>
						<p>
							<label>所属:</label><br />
							<select class="styled" name="pid">
								<option value='0'>顶级分类</option>
								<?php foreach($cat_list as $row):?>
								<?php if(isset($cat['pid']) && $cat['pid'] == $row['cid']): ?>						
									<option selected="selected" value="<?php echo $row['cid'];?>">
										<?php if($row['level'] >0): for($i=0;$i<$row['level'];$i++):?>
											-
											<?php endfor; endif; ?>
										<?php echo $row['cat_name'];?></option>
								<?php else: ?>
									<option value="<?php echo $row['cid'];?>">
										<?php if($row['level'] >0): for($i=0;$i<$row['level'];$i++):?>
											-
											<?php endfor; endif; ?>
										<?php echo $row['cat_name'];?></option>
								<?php endif; ?>
								<?php endforeach; ?>
							</select>
						</p>
						<p>
							<label>分类描述:</label><br />
							<textarea name="dis" rows="5" cols="50"><?php echo isset($cat['dis'])?$cat['dis']:'';?></textarea>
						</p>
						
						<p></p>
						<input type="hidden" name="cid" value="<?php echo isset($cat['cid'])?$cat['cid']:'';?>">
						<p><input type="submit" class="submit small" value="Submit" /></p>
					</form>
					
				</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
				
			</div>		<!-- .block.small.left ends -->
				
			<div class="block small right">
			
				<div class="block_head">
					<div class="bheadl"></div>
					<div class="bheadr"></div>
					
					<h2>所有分类录</h2>
				</div>		<!-- .block_head ends -->
				
				
				
				<div class="block_content">
				
					<form action="" method="post">
					
						<table cellpadding="0" cellspacing="0" width="100%" class="sortable">
						
							<thead>
								<tr>
									<th width="10"><input type="checkbox" class="check_all" /></th>
									<th>分类名称</th>
									<td>&nbsp;</td>
								</tr>
							</thead>
							
							<tbody>
							<?php  if(isset($cat_list) && is_array($cat_list)): foreach($cat_list as $row): ?>
								<tr>
									<td><input type="checkbox" /></td>
									<td><a href="#">
										<?php if($row['level'] >0): for($i=0;$i<$row['level'];$i++):?>
											-
											<?php endfor; endif; ?>
										<?php echo $row['cat_name'];?></a></td>
									<td class="delete">
										<a href="<?php echo url('spider/spider.php?mod=category&act=index&id='.$row['cid']);?>">Edit</a>
										<a href="<?php echo url('spider/spider.php?mod=category&act=del&id='.$row['cid']);?>">Delete</a>
										</td>
								</tr>
							<?php endforeach; endif;?>	
							</tbody>
							
						</table>
						
						
						
						<div class="tableactions">
							<select>
								<option>Actions</option>
								<option>Delete</option>
								<option>Edit</option>
							</select>
							
							<input type="submit" class="submit tiny" value="Apply to selected" />
						</div>		<!-- .tableactions ends -->
						
						
					</form>
					
				</div>		<!-- .block_content ends -->
				
				<div class="bendl"></div>
				<div class="bendr"></div>
				
			</div>		<!-- .block.small.right ends -->